﻿function ymAlert(msg) {
    ymPrompt.alert({ title: "提示", message: "<div>" + msg + "</div>", width: 310, height: 150 });
}
function ymError(msg) {
    ymPrompt.errorInfo({ title: "提示", message: "<div>" + msg + "</div>", width: 310, height: 150 });
}
var _$_MasterTop =
{
    init: function () {
        ymPrompt.setDefaultCfg({
            width: 300,
            height: 200,
            maskAlphaColor: '#000',
            maskAlpha: 0.1,
            icoCls: '',
            btn: null,
            autoClose: true, //点击关闭、确定等按钮后自动关闭
            fixPosition: true, //随滚动条滚动
            dragOut: false, //不允许拖出窗体范围
            titleBar: true,
            showMask: true,
            winAlpha: 0.8, //拖动窗体时窗体的透明度
            closeBtn: true, //是否显示关闭按钮
            useSlide: true, //不使用淡入淡出
            slideCfg: { increment: 0.3, interval: 50 }, //淡入淡出配置，在useSlide为true时有效
            allowSelect: false, //是否允许选择消息框内容，默认不允许
            allowRightMenu: false //是否允许在消息框使用右键，默认不允许
        });
    }
};
$(function () {
    //disableRightClick();

    var blankPath = "/blank.htm";
    if ($.browser.msie && $.browser.version == "6.0") {
        $('body').append('<iframe class="ifamepanel" src="' + blankPath + '" frameBorder="0" scrolling="no"></iframe>');
    }
    $('body').append('<div id="tooltippanel" class="tooltipshowpanel"></div>');

    AddColnumber();
});

$.ajaxSetup({ cache: false });



function AddColnumber() {
    $("#jqgh_rn").addClass("ui-jqgrid-sortable").append("序号" + "<span class='s-ico' style='display: none;'>" +
                "<span class='ui-grid-ico-sort ui-icon-asc ui-state-disabled ui-icon ui-icon-triangle-1-n' sort='asc'/>" +
                "<span class='ui-grid-ico-sort ui-icon-desc ui-state-disabled ui-icon ui-icon-triangle-1-s' sort='desc'/>" +
                "</span>");
}




function disableRightClick(e) {
    if (!document.rightClickDisabled) // initialize
    {
        if (document.layers) {
            document.captureEvents(Event.MOUSEDOWN);
            document.onmousedown = disableRightClick;
        }
        else document.oncontextmenu = disableRightClick;
        return document.rightClickDisabled = true;
    }
    if (document.layers || (document.getElementById && !document.all)) {
        if (e.which == 2 || e.which == 3) {
            return false;
        }
    }
    else {
        return false;
    }
}